#include "app_data.h"

// USB_POWER 地址 80:64:6f:87:4e:af
uint8_t USBpower_Address[] = {0x80, 0x64, 0x6F, 0x87, 0x4E, 0xAF};

USB_state_data USB_power_data = {
    .usbdata1 = 1,
    .usbdata2 = 1,
    .usbdata3 = 1,
    .usbdata4 = 1,
    .usbdata5 = 1,
};

USB_POWER_data_refresh USBdata_refresh = {
    .USB_OUT1 = 1,
    .USB_OUT2 = 1,
    .USB_OUT3 = 1,
    .USB_OUT4 = 1,
    .oled = 0 // 设置
};

void tx_onedata_to_USB()
{
    USB_power_data.usbdata1 = USBdata_refresh.USB_OUT1;
    USB_power_data.usbdata2 = USBdata_refresh.USB_OUT2;
    USB_power_data.usbdata3 = USBdata_refresh.USB_OUT3;
    USB_power_data.usbdata4 = USBdata_refresh.USB_OUT4;
    USB_power_data.usbdata5 = USBdata_refresh.oled;
    esp_now_send(USBpower_Address, (uint8_t *)&USB_power_data, sizeof(USB_power_data));
    delay(200);
}